package com.wjbgn.bsolver.server.controller;

import com.wjbgn.bsolver.server.service.ICategoryService;
import com.wjbgn.stater.dto.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 * Create Date: 2022-04-16T14:28:22.285
 *
 * @author wjbgn
 * @version 1.0
 */
@Api(tags = "")
@RestController
@RequestMapping("/category")
@AllArgsConstructor
public class CategoryController {

    /**
     * CategoryService
     */
    private ICategoryService categoryService;

    @ApiOperation(value = "获取树形列表")
    @GetMapping("/getCategoryTree")
    public Result getCategoryTree() {

        return Result.success(categoryService.getCategoryTree());
    }
}